package edu.sctu.practice.class02.shilaihong.assign03.text1;

/**
 * Created by admin on 2015/10/22.
 */
public class Circle extends GeometricObject {
    protected double radius;
    public final double PI = 3.14;
    public double area;
    public double perimeter;
    public String color;
    public  Circle(double radius, String blue){
        this("blue", 4.0);
    }
    public Circle( String color,double radious) {
        super("color");
        this.radius = radius;
    }
    public double getRadious() {
        return radius;
    }

    public void setRadious() {
        this.radius = radius;
    }
    @Override
    public double findArea() {
        area= radius * radius * PI;
        return  area;
    }
    @Override
    public double findPerimeter() {
        perimeter=2 * radius * PI;
        return perimeter;
    }
    public boolean equalArea(GeometricObject object1, GeometricObject object2) {
           if (object1.findArea()==object2.findArea()){
               return true;
           }
        return false;
    }
}
